/*
 * @Description: 
 * @Author: wangqi
 * @Date: 2021-05-23 09:55:03
 * @LastEditTime: 2021-05-25 22:57:48
 */
import observe from './observe'
import Watcher from './Watcher';

let obj = {
    a: {
        m: {
            n: 5
        },
        j: 123,
    },
    b: 10,
    c: [2, 3, 4]
};

observe(obj);

obj.a.m.n = 50;
// obj.b = 100
// console.log(obj.a.m.n)

// obj.c.push(5);
// obj.c.splice(1, 1, [200, 300])
// console.log(obj)

new Watcher(obj, 'a.m.n', (val) => {
    console.log('★我是watcher，我在监控a.m.n', val);
});
obj.a.m.n = 66;

console.log(obj, "obj");

